package com.common.www.data.global;

public enum GlobalConfigEnum {

    RELEASE("是否是发布状态(true,false)", "false"),
    SHARE_INCOME_GAP("入账分析间隔时间", (12 * 60 * 60 * 1000) + ""),
    APP_WGET_CODE("APP wget包最新版本号", "1"),
    APP_WGET_URL("APP wget包最新版本号下载地址", "1"),
    XFC_AREA_RATIO("消防区域面积比例", "0.5"),
    FXFC_AREA_RATIO("非消防区域面积比例", "0.5"),

    APP_WEB_PATH("app的绝对地址，根据配置文件的地址来(默认为本地的路径)", "H:\\realtyPlotformWeb-tomcat-9.0.14\\webapps\\realtyApp"),
    WITHDRAW_HANDLE_TIME("最大手动提现时间(毫秒)", (5 * 60 * 1000) + ""),
    WITHDRAW_AUTO_TIME("最大自动提现时间(毫秒)", (5 * 60 * 1000) + ""),
    APP_SERVICE_PROTOCOL("APP服务协议内容", ""),
    APP_SERVICE_POLICY("APP隐私政策", ""),
    APP_DUTY_PROTOCOL("APP免责说明", ""),
    APP_ABOUT_US("APP关于我们", ""),
    ;

    private String describe = "";
    private String defaultValue = "";

    // 构造方法
    GlobalConfigEnum(String describe, String defaultValue) {
        this.describe = describe;
        this.defaultValue = defaultValue;
    }

    public String getDescribe() {
        return describe;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    /**
     * 根据名字遍历查找对应的枚举值，测试时使用
     */
    public static GlobalConfigEnum getEnumByName(String name) {
        GlobalConfigEnum configEnum = null;
        for (int i = 0; i < GlobalConfigEnum.values().length; i++) {
            if (GlobalConfigEnum.values()[i].name().equals(name)) {
                configEnum = GlobalConfigEnum.values()[i];
            }
        }
        return configEnum;
    }
}
